import Toastify from 'toastify-js'
import 'toastify-js/src/toastify.css'

export const showToast = (message, type = 'error') => {
  const background = type === 'success' 
    ? 'linear-gradient(to right, #00b09b, #96c93d)' 
    : 'linear-gradient(to right, #ff5f6d, #ffc371)'

  Toastify({
    text: message,
    duration: 3000,
    close: true,
    gravity: 'top',
    position: 'center',
    stopOnFocus: true,
    style: {
      background: background,
    },
  }).showToast()
}
